<div class="tabbable"> <!-- Only required for left/right tabs -->
  <ul class="nav nav-tabs">
    <li class="active"><a href="#tab1" data-toggle="tab">Содержание</a></li>
    <li><a href="#tab2" data-toggle="tab">Параметры</a></li>
    <li><a href="#tab3" data-toggle="tab">Настройка</a></li>
  </ul>
 
 
 
  <div class="tab-content">
      <div class="tab-pane active" id="tab1">
    
<?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm',array( 
    'id'=>'page-form', 
    'enableAjaxValidation'=>false, 
)); ?>

    <p class="help-block">Поля со <span class="required">*</span> обязательны для заполнения.</p> 

  
    <?php echo $form->errorSummary($model); ?>

    <?php echo CHtml::activeLabel($model, 'category_id'); ?>
    <?php echo $form->dropDownList($model, 'category_id', Category::allCategory(), array('class'=>'span5'));  ?>

    <?php echo $form->textFieldRow($model,'title',array('class'=>'span5','maxlength'=>255)); ?>
    
     <?php echo $form->textFieldRow($model,'url',array('class'=>'span5','maxlength'=>255)); ?>

    <br />
    <p>Предварительное содержание</p>
    <?php $this->widget('application.extensions.ckeditor.CKEditor',    //Подключаем CKeditor+CKfinder
                array( 'model'=>$model, 
                        'attribute'=>'prev_content', 
                        'language'=>'ru', 
                        'options'=>array(
                            'width'=>'50%',
                            'height'=>'300px',
                            ),
                        'editorTemplate'=>'full', ));
     ?>
    <br />
    
    
    <p>Полное содержание</p>
    <?php $this->widget('application.extensions.ckeditor.CKEditor',    //Подключаем CKeditor+CKfinder
                array( 'model'=>$model, 
                        'attribute'=>'full_content', 
                        'language'=>'ru', 
                        'options'=>array(
                            'width'=>'50%',
                            'height'=>'400px',
                            ),
                        'editorTemplate'=>'full', ));
     ?>
    
    <br />
    
    
     
     </div>
    
    
     <div class="tab-pane" id="tab2">
    <?php // echo $form->textFieldRow($model,'tags',array('class'=>'span5','maxlength'=>255)); ?>

    <?php echo $form->textFieldRow($model,'meta_title',array('class'=>'span5','maxlength'=>255)); ?>

    <?php echo $form->textAreaRow($model,'meta_description',array('rows'=>6, 'cols'=>50, 'class'=>'span8')); ?>

    <?php echo $form->textAreaRow($model,'meta_keywords',array('rows'=>6, 'cols'=>50, 'class'=>'span8')); ?>

    <?php echo $form->textFieldRow($model,'image',array('class'=>'span5','maxlength'=>50)); ?>
    </div>
    
    
    <div class="tab-pane" id="tab3">
    <?php echo $form->dropDownList($model, 'status', array(1=>'Опубликовано', 0=>'Не опубликовано'), array('style'=>'width:150px'));  ?>


    <br />
    <?php echo $form->labelEx($model, 'public_time'); ?>
    <?php
  
        $this->widget(
                      'zii.widgets.jui.CJuiDatePicker', array(
                      'model' => $model,
                      'attribute' => 'public_time',
                      'language' => 'ru',
                      // 'value' => date('Y-m-d', $model->public_time),                                        
                        'options' => array( 'dateFormat' => 'dd-mm-yy' )            //yy-mm-dd
                                                )
                      );
    ?>


    <?php // echo $form->textFieldRow($model,'public_time',array('class'=>'span5')); ?>

    <?php // echo $form->textFieldRow($model,'access',array('class'=>'span5', 'value'=>$model->isNewRecord ? 'admin' : $model->access, 'maxlength'=>255)); ?>
    </div>
    

    <div class="form-actions"> 
        <?php $this->widget('bootstrap.widgets.TbButton', array( 
            'buttonType'=>'submit', 
            'type'=>'primary', 
            'label'=>$model->isNewRecord ? 'Создать' : 'Сохранить', 
        )); ?>
    </div> 

<?php $this->endWidget(); ?>


 </div>
</div>

